<?php
require_once ('../../public/config/config.php');
require_once ('../class/Book.class.php');

$bookID = $_POST['bookid'];
$book = Book::GetByBookID($bookID);

$book->bookCode = $_POST['bookcode'];
$book->bookName = $_POST['bookname'];
$book->bookAuthor = $_POST['bookauthor'];
$book->bookQty = $_POST['bookqty'];

if($r = $book->SaveBook()){
	$book->RecordHistory($r);
	echo "修改成功 :)";
}else{
	echo "修改失败 :(";
}

?>